<template>
  <div>{{num}}</div>
  <button @click="fn">点我给父组件传值</button>
  <childr111></childr111>
</template>

<script setup>
import childr111 from './childr/childr111.vue'
import { ref } from "vue";
const props= defineProps({
  num:{
    type:Number,
    default:0
  }
})
console.log(props.num)

const emit= defineEmits(['changeData'])
const fn=()=>{
  emit('changeData',true)
}

</script>

<style lang="scss" scoped></style>
